package com.vincent.filepicker.filter;

import com.vincent.filepicker.filter.callback.FileLoaderCallbacks;
import com.vincent.filepicker.filter.callback.FilterResultCallback;
import com.vincent.filepicker.filter.entity.AudioFile;
import com.vincent.filepicker.filter.entity.ImageFile;
import com.vincent.filepicker.filter.entity.NormalFile;
import com.vincent.filepicker.filter.entity.VideoFile;
import ohos.aafwk.ability.Ability;

import static com.vincent.filepicker.filter.callback.FileLoaderCallbacks.*;

/**
 * Created by Vincent Woo
 * Date: 2016/10/11
 * Time: 10:19
 */

public class FileFilter {
    public static void getImages(Ability ability, FilterResultCallback<ImageFile> callback) {
        new FileLoaderCallbacks(ability, callback, TYPE_IMAGE);
    }

    public static void getVideos(Ability ability, FilterResultCallback<VideoFile> callback) {
        new FileLoaderCallbacks(ability, callback, TYPE_VIDEO);
    }

    public static void getAudios(Ability ability, FilterResultCallback<AudioFile> callback) {
        new FileLoaderCallbacks(ability, callback, TYPE_AUDIO);
    }

    public static void getFiles(Ability ability,
                                FilterResultCallback<NormalFile> callback, String[] suffix) {
        new FileLoaderCallbacks(ability, callback, TYPE_FILE, suffix);
    }
}
